package fr.cephb.operonj.core.bio;

import java.io.Serializable;

public class ChromRange
	implements Serializable
	{
	private static final long serialVersionUID = 1L;
	private int chromId;
	private int start;
	private int end;
	
	
	public ChromRange(int chromId, int start,int end)
		{
		super();
		this.chromId = chromId;
		this.start = start;
		this.end = end;
		}
	
	
	public int getChromId()
		{
		return chromId;
		}
	public int getStart()
		{
		return start;
		}

	public int getEnd()
		{
		return end;
		}
	
	
	@Override
	public int hashCode()
		{
		final int prime = 31;
		int result = 1;
		result = prime * result + chromId;
		result = prime * result + start;
		result = prime * result + end;
		return result;
		}


	@Override
	public boolean equals(Object obj)
		{
		if (this == obj) return true;
		if (obj == null) return false;
		if (!(obj instanceof ChromRange)) return false;
		ChromRange other = (ChromRange) obj;
		if (chromId != other.chromId) return false;
		if (start != other.start) return false;
		if (end != other.end) return false;
		return true;
		}
	@Override
	public String toString()
		{
		return "("+getChromId()+")"+getStart()+"-"+getEnd();
		}
	}
